<template>
  <div>
      <el-form width="900px" ref="form" :model="model" label-width="80px">
    <table
      class="tablework"
      cellspacing="0"
      cellpadding="0"
      width="900px"
      border="1px"
    >
      <caption>
        <h2>内部交流</h2>
      </caption>
      <tbody>
        <tr>
          <td class="tdhead" valign="middle">
            <p class="tdp">
              <span style="font-size: 16px"> 拟稿人 </span>
            </p>
          </td>
          <td class="tdtop" valign="middle">
            <el-input v-model="model.drafter"></el-input>
          </td>
          <td class="tdhead" valign="middle">
            <p class="tdp">
              <span style="font-size: 16px"> 拟稿部门 </span>
            </p>
          </td>
          <td class="tdtop" valign="middle">
            <el-input v-model="model.draftDepartment"></el-input>
          </td>
          <td class="tdhead" valign="middle">
            <p class="tdp">
              <span style="font-size: 16px"> 交流时间 </span>
            </p>
          </td>
          <td class="tdtop" valign="middle">
            <el-form-item>
              <el-date-picker
                v-model="model.exchangeTime"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择日期"
              ></el-date-picker>
            </el-form-item>
          </td>
        </tr>

        <tr>
          <td class="tdtwo" valign="middle">
            <p class="tdp">
              <span style="font-size: 16px"> 标题 </span>
            </p>
          </td>
          <td width="473" colspan="5" style="padding: 0px 7px">
            <el-input v-model="model.exchangeTitle"></el-input>
          </td>
        </tr>

        <tr>
          <td class="tdtwo" valign="middle">
            <p class="tdp">
              <span style="font-size: 16px"> 流程环节 </span>
            </p>
          </td>
          <td width="473" colspan="5" style="padding: 0px 7px">
            <el-form-item>
              <el-select v-model="model.taskFlag2">
                <el-option value="1" label="内部交流"></el-option>
                <el-option value="3" label="转区局"></el-option>
                <el-option value="2" label="结束"></el-option>
              </el-select>
            </el-form-item>
          </td>
        </tr>
        <tr>
          <td class="tdtwo" valign="middle">
            <p class="tdp">
              <span style="font-size: 16px"> 流程环节 </span>
            </p>
          </td>
        </tr>

        <tr>
          <td class="tdkey-4" valign="middle">
            <p class="tdp">
              <span style="font-size: 16px"> 基本情况 </span>
            </p>
          </td>
          <td class="tdvalue-4" colspan="5" valign="middle">
            <el-input
              type="textarea"
              :rows="4"
              v-model="model.baseInformation"
            ></el-input>
          </td>
        </tr>
      </tbody>
    </table>
      </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      model: {},
      form: {}
    };
  },
  mounted() {
    this.getYearList();
  },
  methods: {
    getYearList() {
      let startYear = 2015;  // 指定时间
      let date = new Date;
      let nowDate = date.getFullYear();  // 获取当前年
      let years = nowDate - startYear;
      let arr = [];
      for (let i = 0; i < years; i++) {
        arr.unshift(nowDate--)
      }
      arr.unshift(startYear)
      console.log('arr---',arr);
    },
  },
};
</script>

<style scoped lang="less">
.tablework {
  border-collapse: collapse;
  margin: 0 auto;
  text-align: center;

  .tdhead {
    // width: 95px;
    // padding: 0px 7px;
    // background: burlywood;
  }
  .tdtop {
    width: 95px;
    padding: 0px 7px;
  }
  .tdtwo {
    width: 95px;
    padding: 0px 7px;
    border-left: none;
  }

  .tdp {
    // text-align: center;
  }

  .tdkey-4 {
    width: 95px;
    height: 100px;
    padding: 0px 7px;
    border-left: none;
  }
  .tdvalue-4 {
    width: 473px;
    padding: 0px 7px;
    border-right: none;
  }

  .h2,
  h2 {
    font-size: 40px;
    text-align: center;
    color: #000;
  }

  .el-form-item--small.el-form-item {
    margin: auto;
  }
}
.tablework td,
.tablework th {
  border: 1px solid #000;
  // color: #666;
}
</style>